<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<script>
    /*
    var num1=12,num2='34',sum=0;
    sum = num1 + parseInt(num2);

    document.write(sum+"</br>");

    document.write(typeof num1+"</br>");
    document.write(typeof num2+"</br>");


    var data = null;	// 待判断的数据
    var type = 'Null';	// 数据类型，开始字母要大写，如Boolean等
    // 检测数据类型的表达式，若是指定的type型，则返回true，否则返回false

    document.write(Object.prototype.toString.call(data)+"</br>");
    document.write(typeof data+"</br>");
    Object.prototype.toString.call(data) == '[object ' + type + ']';




    document.write(Boolean(undefined));
    document.write(Boolean(null));
    document.write(Boolean(NaN));



   /* var con = prompt();
    if (Boolean(con)) {
      document.write('已输入内容');
    } else {
      document.write('无输入内容');
    }*/


   // 获取用户的输入，完成自动求和
    /*var num1 = prompt('请输入求和的第1个数据：');
    var num2 = prompt('请输入求和的第2个数据：');
    console.log(num1 + num2);
    console.log(parseInt(num1) + parseInt(num2));*/
    document.write(parseInt("123abc")+"<br>")
    document.write(parseFloat("123.23abc")+"<br>")
    document.write(parseFloat("0123.23abc")+"<br>")
    document.write(Number(true)+"<br>")

    document.write(isNaN(Number("123abc")))
    document.write(isNaN(1)+"<br>")





    var num1 = num2 = num3 = 4, num4 = 26;
    document.write(String(12)+"<br>");
    document.write(num1 + num2 + num3.toString()+"<br>");
    document.write(num4.toString(2)+"<br>");


    var x, y, z;        	  // 声明变量
x = 1;		  // 将表达式“1”的值赋给变量x
y = 2 + 3;	  // 将表达式“2 + 3”的值赋给变量y
z = y = x;	  // 将表达式“y = x”的值赋给变量z
document.write(z);	  // 将表达式“z”的值作为参数传给console.log()方法
document.write(x + y); // 将表达式“x + y”的值作为参数传给con



    //a=2, b=++a;document.write(b);
    a=2, b=a++;document.write(a);


    document.write((-5)%3+"<br>");
    document.write(5/(-3)+"<br>");


    var a = 1;
    var b = 2;
    var x = a + b++;
    document.write("b= " + b);
    document.write("x= " + x);


    var c1=c2=c3=4;

    var a = 10;
    var b = 10 + "";
    console.info(typeof a,typeof b);

</script>
<body>

</body>
</html>